//
//  User.h
//  MM
//
//  Created by 郑渊文 on 5/21/15.
//  Copyright (c) 2015 王晨辉. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "APIClient.h"
#import "BaseModel.h"
#import "UserModel.h"

@interface UserDAL : NSObject

@property (strong, nonatomic) NSString *userID;
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSString *password;

//登陆
+ (NSURLSessionDataTask *)getUser:(NSDictionary *)paramDic
                          success:(void (^)(UserModel *user))block
                           failed:(void (^)(NSError *error))error;
//
//
////Login
//+ (NSURLSessionDataTask *)Login_WithParams:(NSDictionary*)paramDic
//                                withBlock:(void (^)(NSArray *data, NSError *error))block;

//获取验证码
+ (NSURLSessionDataTask *)getCheckNum:(NSDictionary *)paramDic
                             withBlock:(void (^)(NSString *checkNum, NSError *error))block;


//注册
+ (NSURLSessionDataTask *)registerWithParams:(NSDictionary *)paramDic
                            withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//首页图片
+ (NSURLSessionDataTask *)getFirstImgWithParams:(NSDictionary *)paramDic
                                   withBlock:(void (^)(NSArray *data, NSError *error))block;

//家园系统
+ (NSURLSessionDataTask *)getHomeDataWithParams:(NSDictionary *)paramDic
                                      withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//出发
+ (NSURLSessionDataTask *)getOutDoorWithParams:(NSDictionary *)paramDic
                                      withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//活动类别
+ (NSURLSessionDataTask *)getOutDoorActivitiesWithParams:(NSDictionary *)paramDic
                                     withBlock:(void (^)(NSArray *data, NSError *error))block;

//活动报名接口
+ (NSURLSessionDataTask *)getActivityJoinedInfoWithParams:(NSDictionary *)paramDic
                                               withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//发表活动评论接口
+ (NSURLSessionDataTask *)getActivityCommentsWithParams:(NSDictionary *)paramDic
                                               withBlock:(void (^)(NSArray *data, NSError *error))block;
//参与活动接口
+ (NSURLSessionDataTask *)getActivityJoineWithParams:(NSDictionary *)paramDic
                                              withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//课程支付接口
+ (NSURLSessionDataTask *)getClassesPaymentWithParams:(NSDictionary *)paramDic
                                           withBlock:(void (^)(NSArray *data, NSError *error))block;

//消息详情
+ (NSURLSessionDataTask *)getMessageDetailsWithParams:(NSDictionary *)paramDic
                                            withBlock:(void (^)(NSArray *data, NSError *error))block;
//消息中心
+ (NSURLSessionDataTask *)getMessageCenterWithParams:(NSDictionary *)paramDic
                                            withBlock:(void (^)(NSArray *data, NSError *error))block;
// 添加宝宝
+ (NSURLSessionDataTask *)addBabyWithParams:(NSDictionary *)paramDic
                                            withBlock:(void (^)(NSArray *data, NSError *error))block;
// 宝宝园内点滴
+ (NSURLSessionDataTask *)getBabyHistoryWithParams:(NSDictionary *)paramDic
                                            withBlock:(void (^)(NSArray *data, NSError *error))block;
//  孩子成长报告
+ (NSURLSessionDataTask *)getBabyReportDetailsWithParams:(NSDictionary *)paramDic
                                            withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//活动详情
+ (NSURLSessionDataTask *)getOutDoorActivityDetailsWithParams:(NSDictionary *)paramDic
                                               withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//预约课程
+ (NSURLSessionDataTask *)getAllClassesWithParams:(NSDictionary *)paramDic
                                                    withBlock:(void (^)(NSArray *data, NSError *error))block;

//早教指导师预约&&支付
+ (NSURLSessionDataTask *)getteacherAppointmentPaymentParams:(NSDictionary *)paramDic
                                        withBlock:(void (^)(NSArray *data, NSError *error))block;


//导师空闲时间查询
+ (NSURLSessionDataTask *)getTeacherIdleTimeParams:(NSDictionary *)paramDic
                                                   withBlock:(void (^)(NSArray *data, NSError *error))block;
//早教指导老师预约
+ (NSURLSessionDataTask *)getTeachersParams:(NSDictionary *)paramDic
                                         withBlock:(void (^)(NSArray *data, NSError *error))block;

////早教老师介绍//了解上门早教//上门早教
+ (NSURLSessionDataTask *)getPreschoolEducationInfoParams:(NSDictionary *)paramDic
                                  withBlock:(void (^)(NSArray *data, NSError *error))block;
//早教老师详情
+ (AFHTTPRequestOperation *)getTowPreschoolEducationInfoParams:(NSDictionary *)paramDic
                                                     withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//了解上门早教
+ (NSURLSessionDataTask *)getPreschoolEducationInfoParamsTwo:(NSDictionary *)paramDic
                                                withBlock:(void (^)(NSDictionary *data, NSError *error))block;



//同城解读
+ (NSURLSessionDataTask *)getEvaluationDetailItemsParams:(NSDictionary *)paramDic
                                                withBlock:(void (^)(NSArray *data, NSError *error))block;

//测评报告展示
+ (NSURLSessionDataTask *)getevaluationResultsShownParams:(NSDictionary *)paramDic
                                               withBlock:(void (^)(NSArray *data, NSError *error))block;
//测题回顾
+ (NSURLSessionDataTask *)getEvaluationResultsReviewParams:(NSDictionary *)paramDic
                                                withBlock:(void (^)(NSArray *data, NSError *error))block;
//测评结果提交
+ (NSURLSessionDataTask *)getevaluationResultsSubmitParams:(NSDictionary *)paramDic
                                                 withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//测评题目
+ (NSURLSessionDataTask *)startEvaluationParams:(NSDictionary *)paramDic
                                                 withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//测评信息
+ (NSURLSessionDataTask *)getCharacterEvaluatingParams:(NSDictionary *)paramDic
                                      withBlock:(void (^)(NSArray *data, NSError *error))block;

//地址接口
+ (NSURLSessionDataTask *)getAreasParams:(NSDictionary *)paramDic
                                             withBlock:(void (^)(NSArray *data, NSError *error))block;
//消息中心
+ (NSURLSessionDataTask *)getMessageCenterParams:(NSDictionary *)paramDic
                                       withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//消息详情
+ (NSURLSessionDataTask *)getMessageDetailsParams:(NSDictionary *)paramDic
                                        withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//获取早教状态
+ (NSURLSessionDataTask *)getTeachstatusParams:(NSDictionary *)paramDic
                                     withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//添加宝宝
+ (NSURLSessionDataTask *)getAddBabyParams:(NSDictionary *)paramDic
                                 withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//等待支付
+ (NSURLSessionDataTask *)getWaitForPayParams:(NSDictionary *)paramDic
                                    withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//上课中
+ (NSURLSessionDataTask *)getInteachingParams:(NSDictionary *)paramDic
                                    withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//上课详情
+ (NSURLSessionDataTask *)getClassdetailParams:(NSDictionary *)paramDic
                                     withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//上课总结
+ (NSURLSessionDataTask *)getClasssummaryParams:(NSDictionary *)paramDic
                                      withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//上课评价
+ (NSURLSessionDataTask *)getClasssuggestParams:(NSDictionary *)paramDic
                                      withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//家园统合
+ (NSURLSessionDataTask *)getHomeCollectionParams:(NSDictionary *)paramDic
                                        withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//宝宝园内点滴
+ (NSURLSessionDataTask *)getBabyHistoryParams:(NSDictionary *)paramDic
                                     withBlock:(void (^)(NSArray *data, NSError *error))block;

//户外亲子
+ (NSURLSessionDataTask *)getHomePaternityActivityParams:(NSDictionary *)paramDic
                                     withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//户外亲子
+ (NSURLSessionDataTask *)getReadEvaluationParams:(NSDictionary *)paramDic
                                               withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//意见反馈
+ (NSURLSessionDataTask *)getAppsuggestionParams:(NSDictionary *)paramDic
                                        withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//我的同城解读
+ (NSURLSessionDataTask *)getMyEvaluationDetailItemsParams:(NSDictionary *)paramDic
                                       withBlock:(void (^)(NSArray *data, NSError *error))block;

///答案提交
+ (NSURLSessionDataTask *)getEvaluationResultsSubmitParams:(NSDictionary *)paramDic
                                                 withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//评测报告
+ (NSURLSessionDataTask *)getParentReportParams:(NSDictionary *)paramDic
                                        withBlock:(void (^)(NSArray *data, NSError *error))block;

//找回密码
+ (NSURLSessionDataTask *)getResetPasswordParams:(NSDictionary *)paramDic
                                        withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//宝宝成长报告
+ (NSURLSessionDataTask *)getBabyGrewUpReportParams:(NSDictionary *)paramDic
                                       withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//删除宝宝
+ (NSURLSessionDataTask *)getDeletebabyParams:(NSDictionary *)paramDic
                                          withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//课程报名
+ (AFHTTPRequestOperation *)classAppointmentParams:(NSDictionary *)paramDic
                                         withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//宝宝成长报告
#define kNetPath_BabyGrewUpReport                     @"api/babyGrewUpReport.aspx"
//答案提交
#define kNetPath_EvaluationResultsSubmit                     @"api/evaluationResultsSubmit.aspx"
//户外亲子
#define kNetPath_HomePaternityActivity                     @"api/homePaternityActivity.aspx"
//查看评价
#define kNetPath_ReadEvaluation                     @"api/readEvaluation.aspx"
//删除宝宝
#define kNetPath_deletebaby                     @"api/deletebaby.aspx"

//获取宝宝
+ (NSURLSessionDataTask *)getBabysParams:(NSDictionary *)paramDic
                               withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//预约老师
+ (AFHTTPRequestOperation *)teacherAppointmentParams:(NSDictionary *)paramDic
                                           withBlock:(void (^)(NSDictionary *data, NSError *error))block;

//支付宝
+ (AFHTTPRequestOperation *)alipayCenterParams:(NSDictionary *)paramDic
                                           withBlock:(void (^)(NSDictionary *data, NSError *error))block;
//测评报告详情
+ (AFHTTPRequestOperation *)evaluationResultsDetailsParams:(NSDictionary *)paramDic
                                     withBlock:(void (^)(NSDictionary *data, NSError *error))block;





//意见反馈
#define kNetPath_Appsuggestion                     @"api/appsuggestion.aspx"


//注销
+ (void)logoutAccount;
///获取userdefault中存的用户名 和钥匙串中密码
+ (void)getAccount:(void (^)(NSString *username,NSString *password))block;
//存储用户名userdefault ,密码到钥匙串
+ (void)saveAccount:(NSString *)name andPassword:(NSString *)password;


@end
